import fetch from '@/utils/fetch';

// 购买授权
// Auth { id, sid, uid, authTime, description, status, price }
export function buyAuth(data) {
  return fetch({
    url: '/auth/buy',
    method: 'post',
    data,
  });
}

// 查看我购买的授权
// ?uid=
export function queryMyBoughtAuth(data) {
  return fetch({
    url: '/auth/my_bought',
    method: 'get',
    data,
  });
}

// 查看我卖出的授权
// ?uid=
export function queryMySoldAuth(data) {
  return fetch({
    url: '/auth/my_sold',
    method: 'get',
    data,
  });
}
